Integrand size = 23, antiderivative size = 272 \[ \int \frac {(a+b \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=\frac {(a+b) \left (a^2-4 a b+b^2\right ) \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {(a+b) \left (a^2-4 a b+b^2\right ) \arctan \left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 b \left (3 a^2-b^2\right )}{d \sqrt {\cot (c+d x)}}+\frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {(a-b) \left (a^2+4 a b+b^2\right ) \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {(a-b) \left (a^2+4 a b+b^2\right ) \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d} \]
[Out]
Time = 0.47 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.478, Rules used = {3754, 3646, 3709, 3610, 3615, 1182, 1176, 631, 210, 1179, 642} \[ \int \frac {(a+b \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=\frac {(a+b) \left (a^2-4 a b+b^2\right ) \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {(a+b) \left (a^2-4 a b+b^2\right ) \arctan \left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{\sqrt {2} d}+\frac {2 b \left (3 a^2-b^2\right )}{d \sqrt {\cot (c+d x)}}+\frac {(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}+\frac {2 b^2 (a \cot (c+d x)+b)}{5 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)} \]
[In]
[Out]
Rule 210
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 1182
Rule 3610
Rule 3615
Rule 3646
Rule 3709
Rule 3754
Rubi steps \begin{align*} \text {integral}& = \int \frac {(b+a \cot (c+d x))^3}{\cot ^{\frac {7}{2}}(c+d x)} \, dx \\ & = \frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {2}{5} \int \frac {-6 a b^2-\frac {5}{2} b \left (3 a^2-b^2\right ) \cot (c+d x)-\frac {1}{2} a \left (5 a^2-3 b^2\right ) \cot ^2(c+d x)}{\cot ^{\frac {5}{2}}(c+d x)} \, dx \\ & = \frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {2}{5} \int \frac {-\frac {5}{2} b \left (3 a^2-b^2\right )-\frac {5}{2} a \left (a^2-3 b^2\right ) \cot (c+d x)}{\cot ^{\frac {3}{2}}(c+d x)} \, dx \\ & = \frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 b \left (3 a^2-b^2\right )}{d \sqrt {\cot (c+d x)}}+\frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {2}{5} \int \frac {-\frac {5}{2} a \left (a^2-3 b^2\right )+\frac {5}{2} b \left (3 a^2-b^2\right ) \cot (c+d x)}{\sqrt {\cot (c+d x)}} \, dx \\ & = \frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 b \left (3 a^2-b^2\right )}{d \sqrt {\cot (c+d x)}}+\frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {4 \text {Subst}\left (\int \frac {\frac {5}{2} a \left (a^2-3 b^2\right )-\frac {5}{2} b \left (3 a^2-b^2\right ) x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{5 d} \\ & = \frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 b \left (3 a^2-b^2\right )}{d \sqrt {\cot (c+d x)}}+\frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \text {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}-\frac {\left ((a-b) \left (a^2+4 a b+b^2\right )\right ) \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d} \\ & = \frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 b \left (3 a^2-b^2\right )}{d \sqrt {\cot (c+d x)}}+\frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}-\frac {\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}-\frac {\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}+\frac {\left ((a-b) \left (a^2+4 a b+b^2\right )\right ) \text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d}+\frac {\left ((a-b) \left (a^2+4 a b+b^2\right )\right ) \text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d} \\ & = \frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 b \left (3 a^2-b^2\right )}{d \sqrt {\cot (c+d x)}}+\frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {(a-b) \left (a^2+4 a b+b^2\right ) \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {(a-b) \left (a^2+4 a b+b^2\right ) \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d} \\ & = \frac {(a+b) \left (a^2-4 a b+b^2\right ) \arctan \left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {(a+b) \left (a^2-4 a b+b^2\right ) \arctan \left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {8 a b^2}{5 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {2 b \left (3 a^2-b^2\right )}{d \sqrt {\cot (c+d x)}}+\frac {2 b^2 (b+a \cot (c+d x))}{5 d \cot ^{\frac {5}{2}}(c+d x)}+\frac {(a-b) \left (a^2+4 a b+b^2\right ) \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {(a-b) \left (a^2+4 a b+b^2\right ) \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.57 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.38 \[ \int \frac {(a+b \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=\frac {2 \left (\left (-9 a^2 b+3 b^3\right ) \operatorname {Hypergeometric2F1}\left (-\frac {5}{4},1,-\frac {1}{4},-\cot ^2(c+d x)\right )+a \left (a (9 b+5 a \cot (c+d x))-5 \left (a^2-3 b^2\right ) \cot (c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{4},1,\frac {1}{4},-\cot ^2(c+d x)\right )\right )\right )}{15 d \cot ^{\frac {5}{2}}(c+d x)} \]
[In]
[Out]
Time = 1.36 (sec) , antiderivative size = 246, normalized size of antiderivative = 0.90
method | result | size |
derivativedivides | \(-\frac {-\frac {2 b^{3}}{5 \cot \left (d x +c \right )^{\frac {5}{2}}}-\frac {2 b \left (3 a^{2}-b^{2}\right )}{\sqrt {\cot \left (d x +c \right )}}-\frac {2 a \,b^{2}}{\cot \left (d x +c \right )^{\frac {3}{2}}}+\frac {\left (a^{3}-3 a \,b^{2}\right ) \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{4}+\frac {\left (-3 a^{2} b +b^{3}\right ) \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{4}}{d}\) | \(246\) |
default | \(-\frac {-\frac {2 b^{3}}{5 \cot \left (d x +c \right )^{\frac {5}{2}}}-\frac {2 b \left (3 a^{2}-b^{2}\right )}{\sqrt {\cot \left (d x +c \right )}}-\frac {2 a \,b^{2}}{\cot \left (d x +c \right )^{\frac {3}{2}}}+\frac {\left (a^{3}-3 a \,b^{2}\right ) \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{4}+\frac {\left (-3 a^{2} b +b^{3}\right ) \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )}{4}}{d}\) | \(246\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1399 vs. \(2 (234) = 468\).
Time = 0.36 (sec) , antiderivative size = 1399, normalized size of antiderivative = 5.14 \[ \int \frac {(a+b \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {(a+b \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=\int \frac {\left (a + b \tan {\left (c + d x \right )}\right )^{3}}{\sqrt {\cot {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 243, normalized size of antiderivative = 0.89 \[ \int \frac {(a+b \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=\frac {8 \, {\left (b^{3} + \frac {5 \, a b^{2}}{\tan \left (d x + c\right )} + \frac {5 \, {\left (3 \, a^{2} b - b^{3}\right )}}{\tan \left (d x + c\right )^{2}}\right )} \tan \left (d x + c\right )^{\frac {5}{2}} - 10 \, \sqrt {2} {\left (a^{3} - 3 \, a^{2} b - 3 \, a b^{2} + b^{3}\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - 10 \, \sqrt {2} {\left (a^{3} - 3 \, a^{2} b - 3 \, a b^{2} + b^{3}\right )} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - 5 \, \sqrt {2} {\left (a^{3} + 3 \, a^{2} b - 3 \, a b^{2} - b^{3}\right )} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) + 5 \, \sqrt {2} {\left (a^{3} + 3 \, a^{2} b - 3 \, a b^{2} - b^{3}\right )} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )}{20 \, d} \]
[In]
[Out]
\[ \int \frac {(a+b \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=\int { \frac {{\left (b \tan \left (d x + c\right ) + a\right )}^{3}}{\sqrt {\cot \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \tan (c+d x))^3}{\sqrt {\cot (c+d x)}} \, dx=\int \frac {{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^3}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}} \,d x \]
[In]
[Out]